package com.wd.current.model.Utils

import com.wd.current.model.Bean.DataBean
import io.reactivex.Observable
import okhttp3.MultipartBody
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST
import retrofit2.http.Multipart
import retrofit2.http.PUT

import retrofit2.http.Part
import retrofit2.http.Query

/**
 * 作者: 张智聪
 * 时间: 2024/10/16
Time:  14:18
 * 描述:
 */
interface Aplis {
    @GET("live-platform/findLiveList")
    fun getHomeList(
        @Header("userId") userId:Int,
        @Query("liveType") liveType:Int,
        @Query("page")page:Int,
        @Query("size")size:Int,
    ):Observable<DataBean.HomeList>


    //=======================查询推荐匹配星座列表===================
    @GET("live-user/verify/findRecommendConstellation")
    fun getRecommendConstellationData(
        @Header("userId")userId:Int,
        @Header("sessionId")sessionId:String,
        @Query("count")count:Int,
        @Query("maxFriendId")maxFriendId:Int
    ):Observable<DataBean.FindRecommendConstellationBean>


    //============================查询榜单=====================
    @GET("live-platform/findLeaderBoard")
    fun getFindLeaderBoardData():Observable<DataBean.FindLeaderBoardBean>


    //===============================查询所有礼物================
    @GET("live-platform/findAllGift")
    fun getAllGiftData():Observable<DataBean.FindAllGiftBean>

    //=======================================搭鹊桥
    @POST("live-platform/verify/magpieBridge")
    fun magpieBridge(
        @Header("userId")userId:Int,
        @Header("sessionId")sessionId:String,
        @Query("liveId") liveId:Int
    ):Observable<DataBean.PutBean>


//开直播
@Multipart
@POST("live-platform/verify/openLive")
fun postOpenLive(
    @Header("userId")userId:Int,
    @Header("sessionId")sessionId:String,
    @Query("liveType") liveType:Int,
    @Query("liveTitle") liveTitle:String,
    @Query("longitude") longitude:String,
    @Query("latitude") latitude:String,
    @Part part: MultipartBody.Part
): Observable<DataBean.OpenLiveBean>

    @DELETE("live-platform/verify/closeLive")
    fun closeLive(
        @Header("userId")userId:Int,
        @Header("sessionId")sessionId:String
    ):Observable<DataBean.CloseLiveBean>
    //观看直播
    //live-platform/watchLive
    @GET("live-platform/watchLive")
    fun getWatchLiveData(
        @Header("userId")userId:Int,
        @Header("sessionId")sessionId:String,
        @Query("liveId")liveId:Int
    ):Observable<DataBean.WatchLiveBean2>
    @POST("live-user/v1/login")
    fun DengData(
        @Body body: Map<String, String>
    ): Observable<DataBean.DengBean>
    @GET("live-user/findConstellationList")
    fun constella(

    ): Observable<DataBean.FindConstellationList>




}